package com.joysuch.wwyt.common.mapper;

import cn.hutool.core.date.DateTime;
import com.joysuch.wwyt.common.entity.CommonBusinessNotice;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.joysuch.wwyt.core.bean.SimpleSelectListBean;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author heqifeng
 * @since 2022-01-10
 */
public interface AppBusinessNoticeMapper extends BaseMapper<CommonBusinessNotice> {

    List<SimpleSelectListBean> selectUnReadCountGroup(Long userId);
    List<SimpleSelectListBean> selectUnReadCountGroupList(Long userId);

    List<SimpleSelectListBean> selectCountGroup(Long userId);

    Long updateReadStatusByRefIdAndTitle(Long refId, String title,Long userId);

    Long updateReadStatusByRefIdAndType(Long refId,String type,Long userId);

    Long updateReadStateByIds(@Param("ids") List<Long> ids);

    Long deleteByIds(@Param("ids") List<Long> ids);

    Long deleteAppNotify(@Param("date") Date date);
    Long deleteGeTui(@Param("date") Date date);
    Long deleteWebNotify(@Param("date") Date date);

    Long deleteTrainingAppNotify(@Param("date") Date date);

    Long deleteTrainingWebNotify(@Param("date") Date date);

}
